#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Copyright © 启明星辰 版权所有
# @Time    : 2023/11/1 16:50
# @Author  : 胡浩浩
# @File    : api_doc_model.py
# @IDE     : PyCharm
# @description :
from pydantic import BaseModel
from tortoise import fields, models


class ApiDocModel(models.Model):
    id = fields.IntField(pk=True)
    product_name = fields.CharField(max_length=255)
    product_version = fields.CharField(max_length=50)
    doc_name = fields.CharField(max_length=255)
    api_number=fields.IntField()
    tags_json = fields.JSONField()
    api_list = fields.JSONField()


class ApiDoc(BaseModel):
    product_name: str
    product_version: str
    doc_name: str
    api_number: int
    tags_json: str
    api_list: str
